package com.inspur.security.cbb3.kms.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.io.File;

/**
 * 配置文件常量
 *
 * @author lijunchang
 */
@Component
public class PathConstants {

    /**
     * 系统配置根目录
     */
    public static String FILE_PREFIX_PATH;
    /**
     * 临时文件存放目录
     */
    public static String TEMPFILE_PATH;
    /**
     * 验证码存储位置
     */
    public static String CAPTCHA_IMAGE_PATH;

    @Value("${signweb.filepath.prefix}")
    public void setConfPath(String confPath) {
        FILE_PREFIX_PATH = confPath+File.separator;
        TEMPFILE_PATH=FILE_PREFIX_PATH+"temp"+File.separator;
        CAPTCHA_IMAGE_PATH=FILE_PREFIX_PATH+"captcha"+ File.separator+"images";
    }

}

